{layout name="p/base"}
  <div id="page-wrapper">
    <div class="row">
      <div class="col-lg-12">
        <h1>房车管理 <small>房车信息草稿箱</small></h1>
        <ol class="breadcrumb">
          <li><a href="index.php"><i class="fa fa-dashboard"></i> 管理首页</a></li>
          <li><a href="/caravan"><i class="fa fa-dashboard"></i> 房车信息列表</a></li>
          <li class="active"><i class="fa fa-table"></i> 房车信息草稿箱</li>
        </ol>
        <div class="alert alert-success alert-dismissable">
          <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
          这里可以添加、修改、删除房车信息草稿
        </div>
      </div>
    </div>
    <!-- /.row -->
    <div class="row">
      <div class="col-lg-12">
        <div class="form-group input-group" style="width:40%;float:right;">
          <input class="form-control" type="text" placeholder="房车编号/生产厂家/品牌/等级/状态">
          <span class="input-group-btn">
            <button class="btn btn-default"><i class="fa fa-search"></i>搜索</button>
          </span>
        </div>
        <div class="btn-group">
          <button type="button" id='del' class="btn btn-default">删除</button>
        </div>
        <div class="btn-group">
          <button type="button" id='publish' class="btn btn-default">发布</button>
        </div>
        <a href="/caravan" class="btn btn-link">发布列表</a>
        <a href="/caravan/del" class="btn btn-link">回收站</a>
        <div class="table-responsive">
          <table class="table table-bordered table-hover table-striped tablesorter">
            <thead>
              <tr>
                <th><div class="checker"><span><input type="checkbox" name=""></span></div></th>
                <th>房车编号</th>
                <th>房车名称</th>
                <th>生产厂家</th>
                <th>房车品牌</th>
                <th>房车等级</th>
                <th>状态</th>
                <th>操作</th>
              </tr>
            </thead>
            <tbody>

              <form id='delete' class="form-horizontal" role="form" action="/caravan/delete" method="post">
            <input type="hidden" id='method' name="_method" value="DELETE">
            <input type="hidden" name="status" value="1" />
            {volist name='list' id='vo'}
              <tr>
                <td><div class="checker"><span><input type="checkbox" name="ids[]" value="{$vo.id}"></span></div></td>
                <td>{$vo.number}</td>
                <td>{$vo.name}</td>
                <td>{$vo.carrenders.name}</td>
                <td>{$vo.carbrands.name}</td>
                <td>豪华型</td>
                <td>已分享</td>
                <td><a href="/caravan/{$vo.id}/edit">编辑</a> | <a href="/caravan/{$vo.id}" data-toggle="modal">使用状态</a> | <a href="/caravan/relation?id={$vo.id}" data-toggle="modal">关联设置</a> | <a href="/caravan/price/id/{$vo.id}">设置房车参考价格</a></td>
              </tr>
            {/volist}  
            </form>
              
            </tbody>
          </table>
        </div>
        
      </div>
      <div class="modal-footer">
            <input type="button" value="返回" class="btn btn-default"  onclick="javascript:history.back(-1);" />
      </div>
      <div class="col-sm-12">
        {$list->render()}
      </div>
    </div>
    <!-- /.row -->
    <div class="row">
      
    </div>

  </div><!-- /#page-wrapper -->

<script type="text/javascript" src="/jquery.js"></script>
    <script type="text/javascript">
      $(document).ready(function(){
        $("#del").click(function(){
          $("#delete").submit();
          });
        $("#publish").click(function(){
        $("#delete").attr('action','/caravan/setStauts');
        $("#delete").submit();
          });
        });
      
  </script>